//
//  ThreeListTableViewCell.m
//  RedManStock
//
//  Created by lanou3g on 15/7/22.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ThreeListTableViewCell.h"
#import "ThreeRaceMan.h"
@implementation ThreeListTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setThreeRaceMan:(ThreeRaceMan *)threeRaceMan{
    if (_threeRaceMan!=threeRaceMan) {
        _threeRaceMan=threeRaceMan;
    }
    self.avatorImageView.layer.masksToBounds=YES;
    self.avatorImageView.layer.cornerRadius=30;
    self.rankingLabel.text=threeRaceMan.ranking;
    self.nameLabel.text=threeRaceMan.name;
    if (threeRaceMan.uniqueId==0) {
        self.totalYeildLabel.text=threeRaceMan.raceYieldRate;
        self.uniqueLabel.text=@"总收益率";
    }
    else if(threeRaceMan.uniqueId==1){
        float a=[threeRaceMan.winning floatValue]*100;
        self.totalYeildLabel.text=[NSString stringWithFormat:@"%.2f%%",a];
        self.uniqueLabel.text=@"胜率";
    }
    else{
        self.totalYeildLabel.text=threeRaceMan.fans;
        self.uniqueLabel.text=@"粉丝数";
    }
}

@end
